package cn.tedu.overhaul.management.controller;

import cn.tedu.overhaul.management.dto.persist.mapper.OverhaulToolStockMapper;
import cn.tedu.overhaul.management.pojo.dto.ToolAddNewDTO;
import cn.tedu.overhaul.management.pojo.dto.ToolUpdateDTO;
import cn.tedu.overhaul.management.pojo.vo.ToolAllVO;
import cn.tedu.overhaul.management.pojo.vo.ToolStockVO;
import cn.tedu.overhaul.management.pojo.vo.ToolToStockSelectVO;
import cn.tedu.overhaul.management.pojo.vo.ToolVO;
import cn.tedu.overhaul.management.service.IOverhaulToolService;
import cn.tedu.rtms.commons.pojo.vo.PageData;
import cn.tedu.rtms.commons.web.JsonResult;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.hibernate.validator.constraints.Range;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/overhaul/ToolStock")
@Api(tags = "04. 库存模块")
@Validated
public class OverhaulToolStockController {

    @Autowired
    OverhaulToolStockMapper overhaulToolStockMapper;


    @GetMapping("")
    @ApiOperation("查询库存记录")
    @ApiOperationSupport(order = 300)
    public JsonResult<List<ToolToStockSelectVO>> selectRent(){
        log.debug("开始处理【查询库存记录】的请求");
        List<ToolToStockSelectVO> list=overhaulToolStockMapper.selectTool();
        log.debug("处理【查询库存记录】的请求完成,得到的数据:{}", list);
        return JsonResult.ok(list);
    }




}
